package com.example.musicserver.mapper;

import com.example.musicserver.model.Music;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 18446
 * Date: 2022-07-27
 * Time: 15:09
 */
@Mapper
public interface MusicMapper {


     int insert(String title,String singer,String time,String url,int userid);

     //查询当前音乐的id是否存在
     Music findMusicById(int id);

     //删除当前id存在的音乐
     int deleteMusicById(int musicId);

     //查询所有音乐
     List<Music> findMusic();

     //根据musicName查询音乐
     List<Music> findMusicByName(String musicName);
}
